package com.youyun56.gps.android.common;

import android.location.Location;
import android.os.Bundle;
import android.util.Log;

public class LocationListener implements android.location.LocationListener {
    private final static String tag = LocationListener.class.getName();
    private Location location;

    @Override
    public void onLocationChanged(Location location) {
        Log.i(tag, String.format("lat:%f  long:%f", location.getLatitude(), location.getLongitude()));
        this.location = location;
    }

    public Location getLocation() {
        return location;
    }

    @Override
    public void onProviderDisabled(String provider) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onProviderEnabled(String provider) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onStatusChanged(String provider, int status, Bundle extras) {
        // TODO Auto-generated method stub

    }

    public void setLocation(Location object) {
        this.location = location;
    }

}
